package studiodiva.portfolio.client.view.pages;

import com.google.gwt.user.client.ui.IsWidget;

import studiodiva.portfolio.client.model.titles.Title;

import studiodiva.portfolio.client.lib.lang.Base;
import studiodiva.portfolio.client.view.viewer.TitlePageWidgetProvider;

public class PageViewProvider extends Base implements TitlePageWidgetProvider {
  private final Title pageable;

  public PageViewProvider(Title pageable) {
    initialize(this.pageable = pageable);
  }

  public IsWidget createPageWidget() {
    return new PageView(pageable.getPage());
  }

  public Title getTitle() {
    return pageable;
  }
}
